﻿@using Super.Mvc
@using Zen.Barcode
@model DGOrder
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <script language="javascript" src="/Areas/Admin/Assets/script/LodopFuncs.js"></script>
    <object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width="0" height="0">
        <embed id="LODOP_EM" type="application/x-print-lodop" width="0" height="0"></embed>
    </object>
    <meta http-equiv="x-ua-compatible" content="ie=7" />
    <title>精诚科技打印单</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="zh-cn" http-equiv="Content-Language" />
    <style type="text/css" id="print-style">
        BODY {
     BACKGROUND: #fff
 }
 * {
     MARGIN: 0px auto
 }
 #ecard {
   BORDER-BOTTOM: #000 1px solid; BORDER-LEFT: #000 1px solid; MARGIN-TOP: 40px; WIDTH: 660px; CLEAR: both; BORDER-TOP: #000 1px solid; BORDER-RIGHT: #000 1px solid
 }
 #econ {
     MARGIN: 0px auto 10px;margin-left: 15px;  WIDTH: 620px; OVERFLOW: hidden
 }
 #etop {
     BORDER-BOTTOM: #000 1px solid; HEIGHT: 80px
 }

 #welcome {
     TEXT-ALIGN: center; MARGIN-TOP: 20px; WIDTH: 580px; FONT-FAMILY: "黑体"; FLOAT: left; FONT-SIZE: 36px
 }
 #teamtitle {
     TEXT-ALIGN: left; MARGIN-TOP: 8px; WIDTH: 620px; MARGIN-BOTTOM: 10px; FONT-SIZE: 20px; FONT-WEIGHT: bold
 }
 #main {
     WIDTH: 620px; MARGIN-BOTTOM: 20px
 }
 #mleft {
     LINE-HEIGHT: 150%; WIDTH: 320px; FLOAT: left
 }
 #name {
     MARGIN-TOP: 10px; FONT-SIZE: 20px; FONT-WEIGHT: bold
 }
 #relname {
     PADDING-LEFT: 8px; FONT-SIZE: 14px
 }
 #userinfo {
     TEXT-ALIGN: left; MARGIN-TOP: 20px; FONT-FAMILY: "黑体"; FONT-SIZE: 26px; FONT-WEIGHT: bold
 }
 #userinfo P {
     LINE-HEIGHT: 180%;font-size: 18px;
 }
 #mright {
     WIDTH: 300px; FLOAT: right
 }
 #notice {
     FONT-SIZE: 12px;PADDING-TOP: 8px;line-height: 15px;
 }
 #notice UL {
     LIST-STYLE-TYPE: none; MARGIN: 0px; PADDING-LEFT: 0px
 }
 #notice UL LI {
     LINE-HEIGHT: 26px
 }
 #server {
     padding: 0;  TEXT-ALIGN: center; LINE-HEIGHT: 20px; BACKGROUND-COLOR: #dcdcdc; MARGIN-TOP: 20px; WIDTH: 600px; HEIGHT: 20px; COLOR: #000; CLEAR: both; FONT-SIZE: 14px
 }

    </style>
</head>
<body>
    <form id="print-Order">
    <div id="ecard">
        <div id="econ">
            <!--top -->
            <div id="etop">
                <div id="welcome">
                    精诚科技产品订购单！</div>
            </div>
            <!--endtop -->
            <div id="teamtitle">@Model.DGProduct.Title</div>
            <!--main -->
            <div id="main">
                <div id="mleft">
                    <div id="name">
                        订单编号
                  
                    </div>
                    <div id="relname">
                      
                         @Model.OrderNo
                    </div>
                    <div id="name">
                        订单金额</div>
                    <div id="relname">@Model.Price 元</div>
                    <div id="name">
                        定金</div>
                    <div id="relname">@Model.DingJin 元</div>
                    <div id="userinfo">
                        <p>客户姓名:@Model.ContactName</p>
                        <p>联系电话:@Model.Phone</p>
                        <p>客户签字:_______________</p>
                        <p>订单日期:@Model.CreateTime</p>
                        <p><img src="@Url.Barcode(@Model.OrderNo, BarcodeSymbology.Code128, 40, 1, true)" /></p>
                    </div>
                </div>
                <!--right -->
                <div id="mright">
                    <div id="name">
                        提示</div>
                    <div id="notice">
                        此单据极为重要，请确认此订单信息无误后签字并妥善保管。
                        通常下单并支付定金后，一周左右可以到店里拿货，届时我们会电话联系您。
                        期间请您保持您的电话畅通！
                    </div>
                    <div id="name">
                        取货流程</div>
                    <div id="notice">
                        <ul>
                            <li>1、出示此凭证</li>
                            <li>2、缴纳余款(<span style="color: red; font-weight: bold; font-size: 16px;">@(Model.Price-@Model.DingJin) 元</span>)</li>
                            <li>3、录入用户信息，打印小票 </li>
                            <li>4、将商品交付用户 </li>
                        </ul>
                    </div>
                </div>
                <div style="clear: both">
                </div>
            </div>
            <!--endmain -->
            <div id="server">
                商家电话：400-816-0006 地址：南大街商务馆4楼100-405室（乐购超市楼上）</div>
        </div>
    </div>
    </form>
    <div style="text-align: center; margin: 20px" class="noprint">
        <button style="padding-bottom: 10px; padding-left: 20px; padding-right: 20px; font-size: 16px; cursor: pointer; padding-top: 10px" onclick="print();">打印</button></div>
</body>
<script language="javascript" type="text/javascript">
    var LODOP; //声明为全局变量 
    function print() {
        CreatePrintPage();
        LODOP.PREVIEW();
        
        //LODOP.PRINTA();
    };

    function CreatePrintPage() {
        LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
        var strBodyStyle = "<style>" + document.getElementById("print-style").innerHTML + "</style>";
        var strFormHtml = strBodyStyle + "<body>" + document.getElementById("print-Order").innerHTML + "</body>";
        LODOP.PRINT_INIT("精诚科技-打印");
        LODOP.ADD_PRINT_HTM(50, 50, 300, 550, strFormHtml);
    };
    
</script>
</html>
